package com.lagou.edu.api.impl;
import com.lagou.edu.utils.MailTool;
import com.lagou.edu.api.EmailService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

@Service
public class EmailServiceImpl implements EmailService {

    @Autowired
    private MailTool mailTool;

    @Override
    public boolean sendMail(String email, String code) {
        return mailTool.sendMail(email, "验证码", "你的验证码是: " + code);
    }
}
